<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>通过文件依赖了解任务排序</title>
  </head>
  <body></body>
  <script>
    function load(src, resolve, reject) {
      let script = document.createElement("script");
      script.src = src;
      script.onload = resolve;
      script.onerror = reject;
      document.body.appendChild(script);
    }
    load(
      "js/hd.js",
      () => {
        console.log("加载成功hd");
        hd();
        load(
          "js/houdunren.js",
          () => {
            console.log("加载成功houdunren");
            houdunren();
          },
          () => {
            console.log("加载失败houdunren");
          }
        );
      },
      () => {
        console.log("加载失败hd");
      }
    );
    console.log("2323");
  </script>
</html>
